import request from '@/utils/request'

const api_name = '/hr/service/faq'

export default {
  get_faqs() {
    return request({
      url: `${api_name}/faqs`,
      method: 'get'
    })
  },
  get_faq(id) {
    return request({
      url: `${api_name}/faq`,
      method: 'get',
      params: { id }
    })
  },
  add_faq(faq) {
    return request({
      url: `${api_name}/faq`,
      method: 'post',
      data: faq
    })
  },
  update_faq(faq) {
    return request({
      url: `${api_name}/faq`,
      method: 'put',
      data: faq
    })
  },
  delete_faq(id) {
    return request({
      url: `${api_name}/faq/${id}`,
      method: 'delete'
    })
  }
}
